<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function ajax({method,url,success}){
            var res = 10;
            console.log(method);
            console.log(url);
            console.log(res);
        }

        ajax({
            method:"get",
            url:"http",
            success:res=>{
                console.log(res);
            }
        })
    </script>
</body>
</html>